package springannotaion.compment22;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

/**
 * @author: wyy-sss
 * @date: 2020-02-09 11:08
 **/
//@Component
public class BeanPostProcess2 implements BeanPostProcessor {

	@Override
	public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
		System.out.println(beanName+"\tBeanPostProcessor---------------After");
		return bean;
	}

	@Override
	public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
		System.out.println(beanName+"\tBeanPostProcessor---------------Before");
		return bean;
	}
}
